import random
def athugaHus(a):
	a.sort()
	if(a[0] == a[1] == a[2] and a[3] == a[4]):
		return 1
	if(a[0] == a[1] and a[2] == a[3] == a[4]):
		return 1
	return 0

def kasta():
	mengi = []
	for x in range(5):
		mengi.append(random.randint(1, 6))
	return mengi

teljari = 0
for x in range(1000000):
	teljari += athugaHus(kasta())
print(teljari/1000000)
			
